package com.hzlh.service.impl;

import com.hzlh.dao.TFinancingHistoryDao;
import com.hzlh.model.TFinancingHistory;
import com.hzlh.service.IFinancingHistoryService;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class FinancingHistoryServiceImpl implements IFinancingHistoryService {
    @Resource
    TFinancingHistoryDao tFinancingHistoryDao;
    @Override
    public int deleteByPrimaryKey(Long id) {
        return tFinancingHistoryDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(TFinancingHistory record) {
        return tFinancingHistoryDao.insert(record);
    }

    @Override
    public int insertSelective(TFinancingHistory record) {
        return tFinancingHistoryDao.insertSelective(record);
    }

    @Override
    public TFinancingHistory selectByPrimaryKey(Long id) {
        return tFinancingHistoryDao.selectByPrimaryKey(id);
    }

    @Override
    public List<TFinancingHistory> selectList(Map<String, Object> param) {
        param = CollectionUtils.isEmpty(param)?new HashMap<>():param;
        return tFinancingHistoryDao.selectList(param);
    }

    @Override
    public int updateByPrimaryKeySelective(TFinancingHistory record) {
        return tFinancingHistoryDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TFinancingHistory record) {
        return tFinancingHistoryDao.updateByPrimaryKey(record);
    }
}
